<h1>Listing transactions</h1>

<table>
  <tr>
    <th>Amount</th>
    <th>Giver</th>
    <th>Giver type</th>
    <th>Receiver</th>
    <th>Receiver type</th>
    <th>On date</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @transactions.each do |transaction| %>
  <tr>
    <td><%= transaction.amount %></td>
    <td><%= transaction.giver_id %></td>
    <td><%= transaction.giver_type %></td>
    <td><%= transaction.receiver_id %></td>
    <td><%= transaction.receiver_type %></td>
    <td><%= transaction.on_date %></td>
    <td><%= link_to 'Show', transaction %></td>
    <td><%= link_to 'Edit', edit_transaction_path(transaction) %></td>
    <td><%= link_to 'Destroy', transaction, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Transaction', new_transaction_path %>
